﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;

namespace FreeSwitch.EventSocket.Parser
{
	public class ParsedMessage
	{
		private NameValueCollection _headers = new NameValueCollection();
		private StringBuilder _body = new StringBuilder();

		public NameValueCollection Headers
		{
			get { return _headers; }
		}

		public StringBuilder Body
		{
			get { return _body; }
		}

		public override string ToString()
		{
			StringBuilder sb = new StringBuilder();
			foreach (string key in Headers)
				sb.AppendFormat("{0}: {1}\n", key, _headers[key]);
			return sb.ToString();
		}
	}
}